<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>接口调试首页</title>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script type="text/javascript" src="/js/Ajax141212.js"></script>
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
</head>
<body>
<style>

.topnav{
	margin:0px auto;
	height:30px;
	background:#CCC;

}

</style>



<div class="topnav">
  <div style="margin:0px auto; width:1000px; height:30px; line-height:30px;">
<div style="display:inline-block;">
  测试机(118.190.115.50)</div>
  
  
  
  
    <span style="margin-left:0px;"><a href="/user/login">login</a></span> | 

  </div>

</div>
<div style="margin:0px auto; margin-top:10px; width:1000px;">
  <ul>
    <li>接口名称：获取令牌</li>
    <li>接口地址：<?php echo $gate?></li>
    <li>接口方法：POST</li>
  </ul>
</div>

<br>
<table align="center" width="1000" cellpadding="0" cellspacing="1" style="border:1px solid #CCC">
  <form id="requestform">
  <tr bgcolor="#EEE" height="24">
    <td width="120">参数名</td>
    <td width="400">参数</td>
    <td>必填</td>
    <td>类型</td>
    <td>说明</td>
  </tr>
  <tr bgcolor="#F9F9F9" height="24">
    <td>access_token</td>
    <td><input name="access_token" type="text" value=''/></td>
    <td>是</td>
    <td>string</td>
    <td></td>
  </tr>

  <tr bgcolor="#F9F9F9" height="24">
    <td colspan="5" align="center"><input type="button" value="CURL请求" onclick="request_curl()"/> <input type="button" value="直接请求" onclick="request()"/></td>
  </tr>
  </form>
</table>
<script language="javascript">

var request_url = "/product/list";


function request_curl(){
	
	var grant_type = $('#grant_type').val();
	var $form = $('#requestform');
	
	$form.attr('method', 'POST');
	$form.attr('action', "/client/async-token");
	$form.submit();

}

/**
 * 直接请求
 */
function request(){
    $('#requestform').attr('method', 'POST');
    $('#requestform').attr('target', '_blank');
    $('#requestform').attr('action', request_url);
    $('#requestform').submit();
}

</script>
</body>
</html>